<template>
	<a-card>
		<a-form layout="inline">
			<a-form-item>
				<a-select v-model="listQuery.select_value" style="width: 120px">
					<a-select-option value="全部">全部</a-select-option>
					<a-select-option value="title">标题</a-select-option>
				</a-select>
			</a-form-item>
			<a-form-item><a-input-search enterButton @search="onSearch" /></a-form-item>
			</a-form>
				<a-divider type="vertical" />
 	<a-table :columns="columns" :dataSource="tabledata" bordered rowKey="id" :pagination="false">
  </a-table>
	<a-pagination
		showSizeChanger
		:pageSize.sync="listQuery.page_size"
		:pageSizeOptions="pagesizeoptions"
		@showSizeChange="onShowSizeChange"
		:total="listQuery.total"
		v-model="listQuery.page_number"
	/>
	</a-card>
</template>
<script>
const columns = [{
  title: 'name',
  dataIndex: 'name',
  width: '25%',
  scopedSlots: { customRender: 'name' },
}, {
  title: 'age',
  dataIndex: 'age',
  width: '15%',
  scopedSlots: { customRender: 'age' },
}, {
  title: 'address',
  dataIndex: 'address',
  width: '40%',
  scopedSlots: { customRender: 'address' },
}, {
  title: 'operation',
  dataIndex: 'operation',
  scopedSlots: { customRender: 'operation' },
}]

//import { GetExam, GetEds, GetSubPro, ActionExam } from '@/api/exam';

export default {
  data () {
    return {
			tabledata:[],
			pagesizeoptions: ['20', '50', '200', '5000'],
			listQuery: {
				page_size: 20,
				page_number: 1,
				order_column: 1,
				order_dir: 'asc',
				search_value: '',
				select_value: '全部',
				total:0
			}
		}
  },
  methods: {
		initTable() {
				//this.tabledata = res.data;
				//this.total = res.recordsTotal;
		},
		onSearch(value) {
			this.listQuery.search_value = value;
			this.initTable();
		},onShowSizeChange(current, pageSize) {
			this.listQuery.page_size = pageSize;
			this.listQuery.page_number = current;
			this.initTable();
		}
	},
}
</script>
<style scoped>

</style>